/**
 * problem_031.cpp
 * Copyright (C) 2011 - xrose
 */

#include <iostream>
#include <string>
using namespace std;

int money[8]={1, 2, 5, 10, 20, 50, 100, 200};

int init()
{
	return 0;
}

int calculate(int M, int midx)
{
    int sum = 0;
    if(midx == 7) return 1;
    for(int i = midx; i<8; i++)
    {
        if(M-money[i] == 0) sum++;
        if(M-money[i]>0) sum+=calculate(M-money[i], i);
    }
    return sum;
}

int main (int argc, char const* argv[])
{
    cout<<calculate(200, 0)<<endl;
    return 0;
}
